From: Sebastian Keller Date: Sun, 14 Mar 2021 16:32:26 +0000 (+0100) Subject: iconGrid: Only use page relative coords for orientation in getDropTarget X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~111 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f2db9b52c9113ed991a8786c88fa9ab9bccd6c74;p=gnome-shell.git iconGrid: Only use page relative coords for orientation in getDropTarget The x and y coordinates were both adjusted to be page relative, even though the icon grid can only scroll in one direction. This was leading to coordinates outside of the icon grid to be considered part of it and a wrong drop target to be chosen. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3779 Part-of: --- diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index ddebc308e..cdceb020d 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -1050,8 +1050,10 @@ var IconGridLayout = GObject.registerClass({ page = swap(page, this._pages.length); // Page-relative coordinates from now on - x %= this._pageWidth; - y %= this._pageHeight; + if (this._orientation === Clutter.Orientation.HORIZONTAL) + x %= this._pageWidth; + else + y %= this._pageHeight; if (x < leftEmptySpace || y < topEmptySpace) return [null, DragLocation.INVALID];